package jeopardy.common.protocol.game.play;

import java.io.Serializable;
/*
 * This class is used by the server to communicate with the client
 * to allow a player who has not answered the question that was attempted
 * by another player, who answered the question incorrectly.  It contains:
 * 
 * 1) The attempted answer
 * 2) The player who submitted the incorrect/correct answer
 * 3) The time to taken by player to answer the question
 * 4) The list of players eligible to answer the question
 * 
 */
public class QnAAttemptedMsg implements Serializable{
	
	private static final long serialVersionUID = 2394234234L;
	
	private String answer = "";
	private String answerer = "";
	private long timeTookMilliseconds = 0;
	private String[] eligiblePlayers;
	
	public QnAAttemptedMsg(String answer, String answerer, long timeTookMillis, String[] eligiblePlayers){
		this.answer = answer;
		this.answerer = answerer;
		this.timeTookMilliseconds = timeTookMillis;
		this.eligiblePlayers = eligiblePlayers;
	}

	public String[] getEligiblePlayers() {
		return eligiblePlayers;
	}

	public String getAnswer() {
		return answer;
	}

	public String getAnswerer() {
		return answerer;
	}

	public long getTimeTookMilliseconds() {
		return timeTookMilliseconds;
	}	
}
